package com.yc.so.view.impl;

import com.yc.so.bin.SoBoundsConfigurator;
import com.yc.so.utils.BoundsCalculationUtil;
import com.yc.so.view.SoView;
import javafx.scene.layout.AnchorPane;


/**
 * 搜索视图
 */
public class SearchView implements SoView {

    public AnchorPane getView() {
        return organizationView();
    }


    /**
     * 视图组织
     * @return
     */
    private AnchorPane organizationView(){
        SoBoundsConfigurator bounds = BoundsCalculationUtil.getSearchViewBounds();
        System.out.println("SearchView::"+bounds);
        AnchorPane anchorPane = getAnchorPane(bounds);
        anchorPane.setStyle("-fx-background-color: #0A0B1A;");
        return anchorPane;
    }

    private AnchorPane getAnchorPane(SoBoundsConfigurator bounds) {
        AnchorPane anchorPane=new AnchorPane();
        anchorPane.setPrefWidth(bounds.getWidth());
        anchorPane.setPrefHeight(bounds.getHeight());
        return anchorPane;
    }



}
